<template>
	<view class="list-box">
		<view class="title space-between center">
			<view class="center">
				<text class="name">{{name}}</text>
				<text class="word" v-if="word">{{word}}</text>
			</view>
			<view class="all">
				<text>全部</text>
				<text class="iconfont icon-right"></text>
			</view>
		</view>
		<!-- 主要内容 -->
		<swiper class="swiper-list" next-margin='30rpx'>
			<swiper-item class="swiper-item" v-for="(n,index) in column" :key='index'>
				<view class="swiper-item" v-for="(item,idx) in List ":key='idx'>
					<swiper-course :item='item' ></swiper-course>
				</view>
			</swiper-item>
			
		</swiper>
		
		
		
	</view>
	
</template>

<script>
	 import swiperCourse from '@/components/common/swiper-course/swiper-course'
	export default {
		data() {
			return {
					
			}
		},
		props: {
			name: { // 名称
				type: String,
				default: '热门推荐'
			},
			word: { // 高亮单词，如： 'HOT'
				type: String,
				default: null
			},
			List: { // 高亮单词，如： 'HOT'
				type: Array,
				default: ()=>[]
			},
			column: { // 默认2列
			 type: Number,
			 default: 2
			 }
		},
		methods: {

		},
		components:{
			swiperCourse
		}

	}
</script>

<style lang='scss'>
	.list-box {
		margin-top: 60rpx;

		/* 标题 */
		.title {
			margin-bottom: 20rpx;

			.name {
				font-size: 38rpx;
				font-weight: 500;
				color: #303133;
				margin-right: 10rpx;
			}

			.word {
				/* 从左往右渐变 */
				background-image: linear-gradient(to right, red,orange);
				font-size: 20rpx;
				color: #fff;
				padding: 0 10rpx;
				border-radius: 30rpx 30rpx 30rpx 0;
			}

			.all {
				font-weight: normal;
				color: $mxg-text-color-grey;
				font-size: 28rpx;

				.iconfont {
					font-size: 25rpx;
				}
			}
		}
		}
		.swiper-list{
			width: 100%;
			height: 550px;
		}
		
</style>
